/*
 * lib2Desa - Another 2D game library in C++
 * Copyright (C) 2009 Erivaldo Xavier de Lima Filho
 *
 * This program is free software and is distributed under GNU General Public License version 3. You can modify and/or redistribute
 * it under the terms of GPL version 3 or posterior version. This program comes with NO WARRANTY, for more details, see LICENSE,
 * or <http://www.gnu.org/licenses>.
 *
 * Contact info:
 *
 *	Erivaldo Xavier de Lima Filho, desadoc@gmail.com
 *
 */

#ifndef _GAMEOBJECTGROUP_HPP
#define _GAMEOBJECTGROUP_HPP

#include "Core/GameElement.hpp"
#include "Core/GameObject.hpp"
#include "Core/IGraphicDevice.hpp"

#include <list>

#ifndef _NO_NAMESPACE
namespace lib2Desa {
#endif

class GameObjectGroup : public GameElement
{

protected:

	std::list<shared_ptr<GameObject> > objects;

public:

	GameObjectGroup(void);
	~GameObjectGroup(void);

	void draw(const shared_ptr<IGraphicDevice>& gd) const;
	bool run(u32 ml);

	void add(const shared_ptr<GameObject>& o);
	void remove(const shared_ptr<GameObject>& o);

	std::list<shared_ptr<GameObject> >& getObjects(void);
};

#ifndef _NO_NAMESPACE
}
#endif

#endif /*GameObjectGroup.hpp included*/
